package com.medical.view.wicket.form;

import java.util.Date;

import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.model.IModel;
import org.apache.wicket.validation.validator.EmailAddressValidator;
import org.apache.wicket.validation.validator.StringValidator;

import com.medical.view.wicket.ajax.html.ValidationStyleBehavior;

public class MedEmailField extends MedTextField  {

	public MedEmailField(String id) {
		super(id);
		add(EmailAddressValidator.getInstance());
		add(StringValidator.maximumLength(150));
		
	}

	public MedEmailField(final String id, final Class type)
	{
		super(id);
		setType(type);
		add(EmailAddressValidator.getInstance());
		add(StringValidator.maximumLength(150));
		
	}

	/**
	 * @param id
	 * @param model
	 * @see org.apache.wicket.Component#Component(String, IModel)
	 */
	public MedEmailField(final String id, final IModel  model)
	{
		super(id, model);
		add(EmailAddressValidator.getInstance());
		add(StringValidator.maximumLength(150));
		
	}

}
